import Mock from 'mockjs'

// 用户热度
function getHeatData(number) {
	let heat = []
	for (let i = 0; i < number; i++) {
		heat.push({
			id: random.increment(),
			name: random.ctitle(1, 4)
		})
	}
	
	return heat
}

let random = Mock.Random
export default {
	getUserHeat:(number = 10)=>{
		return {
			state: 200,
			method: 'get',
			code: 10000,
			requestId: random.string('lower', 15),
			path: '/note/heat/user',
			message: '成功',
			error: '无效的身份信息',
			timestamp: random.now('yyyy-MM-dd HH:mm:ss.SSSZ'),
			data: getHeatData(number)
		}
	}
}